package Exercise1;

import java.io.*;

/**
 * ClassName:ExamTest
 * Package:Exercise1
 * Description
 *
 * @Author:@wenxueshi
 * @Create:2022/12/2 - 11:23
 * @Version:v1.0
 */
public class ExamTest {
    public static void main(String[] args){
        BufferedReader bur = null;
        BufferedWriter bwr = null;
        try {
            bur = new BufferedReader(new FileReader("D:\\JavaProject(IDEA)\\JavaSenior\\com.guigu.IO\\in.txt"));
            bwr = new BufferedWriter(new FileWriter("D:\\JavaProject(IDEA)\\JavaSenior\\com.guigu.IO\\out.txt"));
            String s = "";
            while ((s=bur.readLine())!=null)
            {
                bwr.write(MyFile(s));
                bwr.newLine();
            }
        }catch (Exception e)
        {
            e.printStackTrace();
        }finally {
            if(bwr!=null)
            {
                try {
                    bwr.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            if(bur!=null)
            {
                try {
                    bur.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        }
    }
    static String MyFile(String s)
    {
        return s.replaceAll("\\*","");
    }
}
